﻿using ProtoBuf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SyncDemo.Sync.Models
{

    public enum RPCCommandEnum : int
    {
        Unknown = 0,
        Echo = 1,
        Heartbeat = 2,
        Disconnect = 9999,
    }

    [ProtoContract]
    public class RPCInfo
    {
        [ProtoMember(1)]
        public RPCCommandEnum Type { get; set; }

        [ProtoMember(2)]
        public string[] Arguments { get; set; } = Array.Empty<string>();

        public override string ToString()
        {
            return $"type {Type} args {string.Join(',', Arguments)}";
        }
    }
}
